package com.dlc.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.dto.allinpay.AllinpayShopBankCardDTO;
import com.dlc.shop.bean.model.ShopBankCard;
import com.dlc.shop.bean.model.ShopCompany;
import com.dlc.shop.bean.model.ShopDetail;

import java.util.List;

/**
 * 商家提现获取信息
 *
 * @author YXF
 *  * @date 2020-04-07 14:22:08
 */
public interface ShopBankCardService extends IService<ShopBankCard> {


    /**
     * 设置店铺默认银行卡号
     * @param shopBankCardId 店铺银行卡号id
     * @param shopId 店铺id
     */
    void setDefault(Long shopBankCardId, Long shopId);

    /**
     * 批量新增银行账户并提交开店申请
     * @param shopBankCards
     * @param shopId
     * @param employeeId
     */
    void insertBatchAndSubmitApply(List<ShopBankCard> shopBankCards, Long shopId, Long employeeId);

    /**
     * 批量新增结算银行账户
     * @param shopBankCardList
     * @param shopId
     */
    void saveBatchByShopId(List<ShopBankCard> shopBankCardList, Long shopId);

    /**
     * 取消默认账号
     * @param shopBankCardId
     * @param shopId
     */
    void setNotDefault(Long shopBankCardId, Long shopId);

    /**
     * 更新店铺银行卡信息
     * @param shopBankCard
     * @param shopId
     */
    void updateByShopId(ShopBankCard shopBankCard, Long shopId);

    /**
     * 添加银行卡信息
     * @param shopBankCard
     * @return
     */
    Long insertSelective(ShopBankCard shopBankCard);

    /**
     * 将对公户信息和之前提交的工商信息一起交给通联去审核
     * @param allinpayShopBankCardDTO
     * @param shopId
     * @param shopCompany
     */
    void insertAndSetCompanyInfo(AllinpayShopBankCardDTO allinpayShopBankCardDTO, Long shopId,
                                 ShopCompany shopCompany);

    /**
     * 通联设置企业信息
     * @param allinpayShopBankCardDTO
     * @param shopId
     * @param shopCompany
     * @param shopDetailVO
     */
    void allinpaySetCompanyInfo(AllinpayShopBankCardDTO allinpayShopBankCardDTO, Long shopId,
                                ShopCompany shopCompany, ShopDetail shopDetailVO);

    /**
     * 更新通联店铺状态为成功
     * @param shopId
     */
    void updateShopAllinpayStatusToSuccess(Long shopId);

    /**
     * 刷新银行卡
     * @param shopId
     */
    void refresh(Long shopId);
}
